<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function print(time,msg){
            return new Promise((resolve,reject)=>{
                setTimeout(()=>{
                    console.log(msg);
                    resolve();
                },time);
            })
        }
        print(1000,'hello').then()

        async function printAsync(time,msg){
            await print(3000,'hello world')
            await print(5000,'hello world miao')
        }
        var res= printAsync()
    </script>
</body>
</html>